package com.cskaoyan.catmall.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Author: 逍遥子
 * @Date: 2022/01/08/21:00
 * @Description:
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class PermissionInfoVo {

    private List<SystemPermissionsDTO> systemPermissions;
    private String[] assignedPermissions;

    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class SystemPermissionsDTO {
        private String id;
        private String label;
        private List<ChildrenDTO> children;

        @NoArgsConstructor
        @AllArgsConstructor
        @Data
        public static class ChildrenDTO {
            private String id;
            private String label;
            private Integer apiId;
            private List<ChildrenDTO> children;

            @NoArgsConstructor
            @AllArgsConstructor
            @Data
            public static class ChildrenDTOInner {
                private String id;
                private String label;
                private String api;
            }
        }
    }
}
